import requests_cache
from requests import get as _get, post 
from os.path import dirname,abspath,join 
from const import PATH
import traceback

requests_cache.install_cache(join(PATH, "cache"))
def get(url):
    for i in range(3):
        try:
            html = _get(
                url,
                timeout=30
            ).content.decode("utf-8", "ignore")
            break
        except:
            traceback.print_exc()
            html = ""
    return html
